package com.timoon.webcomponent.utility.header;

import org.apache.wicket.markup.html.image.Image;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.request.resource.PackageResourceReference;

import com.timoon.app.resource.image.ImageLocation;

/**
 *<p>功能:header</p>
 *<p>图片限制高度:75px</p>
 *<p>Copyright:Copyright(c)2013</p>
 *<p>Company:sky</p>
 *@author 付乐天
 *@version 1.0 */

public class Header1Panel extends Panel {
	
	private  String INFO_PATH="other/img1.png";
	private  String LOGO_PATH="other/flowerlogo.png";

	public Header1Panel(String id) {
		super(id);
		// TODO Auto-generated constructor stub
		
		renderPanel();
	}
	
	/**
	 * 
	 * @param id
	 * @param infoPath 信息图片
	 * @param logoPath logo图片
	 */
	public Header1Panel(String id,String infoPath,String logoPath) {
		super(id);
		// TODO Auto-generated constructor stub
		
		this.INFO_PATH=infoPath;
		
		this.LOGO_PATH=logoPath;
		
		renderPanel();
	}

	private void renderPanel() {
		// TODO Auto-generated method stub
		
		renderLogo();
		
		renderInfoImage();
	}

	private void renderLogo() {
		// TODO Auto-generated method stub
		add(new Image("wk_logo", new PackageResourceReference(ImageLocation.class,this.LOGO_PATH)));
	}

	private void renderInfoImage() {
		// TODO Auto-generated method stub
		add(new Image("wk_info", new PackageResourceReference(ImageLocation.class,this.INFO_PATH)));
	}

}
